<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <style>
    .box1 {
      width: 200px;
      height: 2000px;
      background-color: red;
    }
  </style>
  <body>
    <div class="box1"></div>
    <script>
      var box1 = document.querySelector(".box1");

      function dab(obj) {
        obj.onmousewheel = function () {
          if (event.wheelDelta > 0) {
            obj.style.height = obj.clientHeight - 20 + "px";
          } else {
            obj.style.height = obj.clientHeight + 20 + "px";
          }
        };

        // event.preventDefault();
        return false;
      }
      dab(box1);
    </script>
  </body>
</html>
